//
//  main.m
//  kvo练习
//
//  Created by apple on 15/9/23.
//  Copyright © 2015年 戴维营. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Human.h"
#import "Man.h"

int main(int argc, const char * argv[]) {
    @autoreleasepool
    {
        Human *human = [Human new];
        
        Man *man = [Man new];
        
        [human addObserver:man forKeyPath:@"name" options:NSKeyValueObservingOptionNew context:NULL];
        
//        human.name = @"zhangSan";
        
        [human testManually];
        
        [human removeObserver:man forKeyPath:@"name"];
        
    }
    return 0;
}
